#include<stdio.h>
int main()
{
	int arr[]={1,2,3,4,5,6,7,8,9,10};
	int left;
	int right;
	int mid;
	int x;
	left=0;
	right=sizeof(arr)/sizeof(arr[0]);
	mid=(right+left)/2;
	scanf("%d",&x);
	if(arr[right]>x)
	{
	while(left!=right)
{
	if(arr[mid]<x)
	{
		left=mid;
		mid=(left+right)/2;
	}
	else
	{
		if(arr[mid]>x)
		{
		    right=mid;
		    mid=(left+right)/2;
		}
		else{
			break;
		}
	}
}printf("找到了下标是%d",mid);
	}else{
		printf("找不到该数字");
	}
	return 0;
}
